package my.design;

import my.design.abshandle.AbstractHandle;
import my.design.concretehandle.CEOHandle;
import my.design.concretehandle.JingLiHandle;
import my.design.concretehandle.ZhuGuanHandle;

/**
 * @Author: BuYee
 * @Date: 2022/9/1
 */
public class ChainStarter {
    public static void main(String[] args) {
        AbstractHandle zhuGuanHandle = new ZhuGuanHandle();
        AbstractHandle jingLiHandle = new JingLiHandle();
        AbstractHandle ceoHandle = new CEOHandle();
        zhuGuanHandle.setHandler(jingLiHandle);
        jingLiHandle.setHandler(ceoHandle);

        zhuGuanHandle.dealIt(501);

    }
}
